#! /bin/bash

PYTHON="python3"
CURR_DIR="/usr/local/libexec/slurm"
PY_SCRIPT="${CURR_DIR}/detect_reset_ecc_mem.py"
GPU_CARD_NUM="`nvidia-smi -L | wc -l`"
LOG_FORMAT="json"
CONF_FILE="${CURR_DIR}/detect_reset_ecc_mem.yaml"
SRC_FILE="/opt/rh/rh-python36/enable"

source ${SRC_FILE}
${PYTHON} ${PY_SCRIPT} -c ${GPU_CARD_NUM} -l ${LOG_FORMAT} -f ${CONF_FILE}
